package com.qczl.util;

import java.io.InputStream;
import java.util.Properties;

public class ConfigUtil {
	public static String getByKey(String file, String key) throws Exception {
		
		Properties prop = new Properties();// 属性集合对象
		InputStream fis = ConfigUtil.class.getClassLoader().getResourceAsStream(file + ".properties");  
		prop.load(fis);
		fis.close();// 关闭流
		return prop.getProperty(key);
	}
	
}
